#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cstring>
using namespace std;
/*
1000 0.333
5
1100 2
1001 2
100 3
500 1
120 3
1000 0.5
3
100 3
500 1
200 1

319.68
500.00
*/ 
int V,N;
float R;
int v[105], c[105];
int v1[1000];
int dp[100005];

int main()
{
    while(cin>>V>>R)
    {
        cin>>N;
        int Count = -1;
        memset(dp, 0, sizeof(dp));
        for(int i = 0; i < N; i++)
        {
            cin>>v[i]>>c[i];
            int t = 1;
            while(1)
            {
                
                Count++;
                if (c[i] -  t > 0)
                {
                    c[i] -= t;
                    v1[Count] = v[i] * t;
                }
                else
                {
                    v1[Count] = c[i] * v[i];
                    break;
                }
                t *= 2;
            }
        }
        for (int i = 0; i <= Count; i++)
        {
            for (int j = V; j >= v1[i]; j--)
            {
                if (dp[j] < dp[j - v1[i]] + v1[i])
                {
                    dp[j] = dp[j - v1[i]] + v1[i];
                }
            }
        }
        cout.setf(ios::fixed);
        cout.precision(2);
        cout<<dp[V] * R<<endl;
    }
	return 0;
}
